package cn.wx.jove.core.service;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.wx.common.persistence.base.BaseService;
import cn.wx.common.persistence.exception.MyException;
import cn.wx.jove.core.entity.Stockdata;
import cn.wx.jove.core.mapper.StockdataMapper;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author
 * @since 2018-11-29
 */
@Service
@Transactional
public class StockdataService extends BaseService<Stockdata, StockdataMapper> {

	/**
	 * 新增
	 * 
	 * @param stockdata
	 * @return
	 * @throws MyException
	 */
	public boolean create(Stockdata stockdata) throws MyException {
		return insert(stockdata);
	}

	/**
	 * 修改
	 * 
	 * @param stockdata
	 * @return
	 * @throws MyException
	 */
	public boolean modify(Stockdata stockdata) throws MyException {
		return update(stockdata);
	}

	public Stockdata queryMax() {
		return simpleMapper.queryMax();
	}

}
